package com.kaifamiao.demo.d730;

/**
 * 银行每开一个户 就会有一个 Account 对象
 */
public class Account {

    // 卡号
    private long cardId;

    // 密码
    private String password;

    // 余额
    private double money;

    // 姓名
    private String name;


    @Override
    public String toString(){
        return this.name + "的卡号是：" + this.cardId + ", 账户余额为：" + this.money;
    }

    public void show(){
        System.out.println(this.name + "的卡号是：" + this.cardId + ",密码是：" + this.password + " 账户余额为：" + this.money);
    }

    // getter / setter 方法

    public long getCardId() {
        return cardId;
    }

    public void setCardId(long cardId) {
        this.cardId = cardId;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public double getMoney() {
        return money;
    }

    public void setMoney(double money) {
        this.money = money;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
